import sys, os

from docs_class import Docs


def dump_tree ( liwe, section, parent_id ):
	d = Docs ( liwe )
	return { "nodes" : d.dump_tree ( section, parent_id ) }

def search ( liwe, txt ):
	d = Docs ( liwe )

	return d.search ( txt )

def get_node ( liwe, id_node ):
	d = Docs ( liwe )

	return d.get_node ( id_node )

def get_templates ( liwe ):
	"""
	:INPUT:
	"""
	d = Docs ( liwe )
	return { "templates" : d.get_templates () }
